import javax.swing.JOptionPane;

public class main {

    static denglujiemian denglujiemian1;
    static yonghujiemian yonghujiemian1;
    static guanliyuanjiemian guanliyuanjiemian1;

    public static void main(String args[]){
        fanhuizhuye();
    }
    static void guanliyuandenglu()
    {
        int guanlizhanghao = 0;

        String str = JOptionPane.showInputDialog(null, "输入账号", "登录", JOptionPane.PLAIN_MESSAGE);
        if (str != null) {
            try {
                guanlizhanghao = Integer.parseInt(str);
                } catch (Exception exp) {
                }
        }
        if(guanlizhanghao==666666){
            guanliyuanjiemian1=new guanliyuanjiemian();
            guanliyuanjiemian1.setVisible(true);

            if(denglujiemian1!=null)
            {
                denglujiemian1.setVisible(false);
            }
            denglujiemian1=null;

            if(yonghujiemian1!=null)
            {
                yonghujiemian1.setVisible(false);
            }
            yonghujiemian1=null;
        }else{
            JOptionPane.showMessageDialog(null,"账号错误","警告",JOptionPane.WARNING_MESSAGE);

        }
    }
    static void yonghudenglu()
    {
        int zhanghao=10000;
        String mima="";
        //弹窗输入

            String str = JOptionPane.showInputDialog(null, "输入账号", "登录", JOptionPane.PLAIN_MESSAGE);
            if (str != null) {
                try {
                    zhanghao = Integer.parseInt(str);


                } catch (Exception exp) {

                }

        }
        if(zhanghao>10000&&zhanghao<99999){


            yonghujiemian1 = new yonghujiemian(zhanghao);
            yonghujiemian1.setVisible(true);

            if (denglujiemian1 != null) {
                denglujiemian1.setVisible(false);
            }
            denglujiemian1 = null;

            if (guanliyuanjiemian1 != null) {
                guanliyuanjiemian1.setVisible(false);
            }
            guanliyuanjiemian1 = null;
        }else{
            JOptionPane.showMessageDialog(null,"账号错误","警告",JOptionPane.WARNING_MESSAGE);

        }

    }
    static void fanhuizhuye()
    {
        denglujiemian1=new denglujiemian();
        denglujiemian1.setVisible(true);

        if(guanliyuanjiemian1!=null)
        {
            guanliyuanjiemian1.setVisible(false);
        }

        if(yonghujiemian1!=null)
        {
            yonghujiemian1.setVisible(false);
        }
    }
    static void tuichu()
    {
        System.exit(0);
    }
}
